//获取应用实例
var app = getApp();
var $util = require("../../../util/util.js");
Page({
    data: {
        productTypes: null
    },
    onLoad: function (options) {
        var that = this;
        that.data.options = options;
        wx.request({
            url: app.globalData.baseUrl + 'weixin/getMenus',
            data: { id: that.data.options.id},
            header: {
                'content-type': 'application/json'
            },
            success: function (res) {
                console.log(res)
                that.setData({ productTypes: res.data });
            }
        });
    },
    onShow: function (options) {
    },
    click: function(event) {
        console.log(event.currentTarget.id)
        var id = event.currentTarget.id;
        wx.navigateTo({
            url: '/page/crm/product/product?id='+id
        })
    }
})